package week2;

import edu.princeton.cs.algs4.StdIn;
import edu.princeton.cs.algs4.StdOut;

/**
 * Created by dyc on 2016/11/10.
 */
public class StackTestClient {
    public static void main(String[] args){
        AbstractStack<String> stack = new ArrayStack<>();
        while (!StdIn.isEmpty()){
            String string = StdIn.readString();
            if (string.equals("-")) {
                //StdOut.print(stack.pop() + " ");
                for (String s : stack)
                    System.out.print(s + " ");
                break;
            }
            else
                stack.push(string);
        }
    }
}
